package com.manong.mapper;

import com.manong.domain.Role;
import com.manong.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    List<Role> selectForList(QueryObject qo);

    void deleteRelation(Long id);

    List<Role> getEmployeeRoleById(Long id);

    void insertBatchRelation(@Param("roleId") Long roleId, @Param("permissionIds") Long[] permissionIds);

    void insertMenuBatchRelation(@Param("roleId") Long roleId, @Param("menuIds") Long[] menuIds);

    void deleteMenuRelation(Long id);
}